package com.jyh.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;


/**
 * 定时任务配置类
 */
@Configuration
@EnableScheduling // 启用定时任务
public class taskTimetoUpdate {
	private final Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private collectionService collectionservice;
	@Scheduled(cron = "0 0 1 * * ?") // 每天凌晨一点
	public void scheduler() {
		logger.info("定时修改数据。。。。。。。。");
		//首先获取所有逾期的单子
		collectionservice.updateLocalInfo();
		}
		
	
}
